<?php

// +----------------------------------------------------------------------
// | Admin Plugin for ThinkAdmin
// +----------------------------------------------------------------------
// | 版权所有 2014~2024 ThinkAdmin [ thinkadmin.top ]
// +----------------------------------------------------------------------
// | 官方网站: https://thinkadmin.top
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// | 免责声明 ( https://thinkadmin.top/disclaimer )
// +----------------------------------------------------------------------
// | gitee 代码仓库：https://gitee.com/zoujingli/think-plugs-admin
// | github 代码仓库：https://github.com/zoujingli/think-plugs-admin
// +----------------------------------------------------------------------

use think\facade\Route;

// 微信小程序认证路由
Route::group('wechat', function () {
    Route::post('login', 'WxBoxController/login');
    Route::post('refresh',  'WxBoxController/refreshToken')->middleware(\app\api\middleware\CheckToken::class);
    Route::post('logout', 'WxBoxController/logout')->middleware(\app\api\middleware\CheckToken::class);
});



Route::group('v1', function () {
    Route::get('index_list', 'WxBoxController/indexList');//小程序首页数据

    Route::post('get_video', 'WxBoxController/getVideo');//小程序去水印
    Route::post('download_video', 'WxBoxController/downloadVideo');//小程序去水印下载视频
    Route::post('feedback', 'WxBoxController/feedback');//小程序反馈数据
    Route::post('translate', 'WxBoxController/translate');//小程序翻译






    //登录
    Route::post('login', 'IndexController/login');
    Route::post('chat', 'IndexController/chat');
    Route::get('currency_list', 'IndexController/currencyList');//货币列表
    Route::post('currency', 'IndexController/currency');//货币转换
    Route::post('kd', 'IndexController/kd');//国内快递



    Route::post('prompt_img', 'IndexController/prompt_img');//文生图
    Route::get('get_tasks', 'IndexController/get_tasks');//获取任务图片

    Route::post('reg', 'IndexController/reg');
});

Route::group('v1', function () {

    Route::post('ok', 'IndexController/index');

    Route::post('logoff', 'IndexController/logoff');//注销


})->middleware(\app\api\middleware\CheckToken::class);